Testing and Tuning Market Trading Systems by Timothy Masters

Testing and Tuning Market Trading Systems by Timothy Masters

Author:Timothy Masters
Language: eng
Format: epub
ISBN: 9781484241738
Publisher: Apress


The first step is to partition the ncases columns of returns in n_blocks subsets of equal or approximately equal size. In the [Bailey et al.] paper, the assumption was that ncases is an integer multiple of n_blocks so that all subsets are the same size. However, I believe that this is not strictly necessary, and it is certainly restrictive. Therefore, I use the array indices to point to the starting case of each subset and use lengths to be the number of cases in each subset. The number of cases in each subset is the number of cases remaining divided by the number of subsets remaining. n_blocks = n_blocks / 2 * 2 ; // Make sure it's even

istart = 0 ;

for (i=0 ; i<n_blocks ; i++) { // For all blocks (subsets of returns)

indices[i] = istart ; // Block starts here

lengths[i] = (ncases - istart) / (n_blocks-i) ; // It contains this many cases

istart += lengths[i] ; // Next block

}



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.